﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Text;
using OpenAuth.Repository.Domain;
using OpenAuth.Repository.Interface;

namespace OpenAuth.App
{
    public class CMZXX007App : ApiBaseApp<CMZXX007>
    {
        public CMZXX007App(IApiRepository<CMZXX007> repository) : base(repository)
        {
        }
        /// <summary>
        /// 查询门诊预交金充值记录
        /// </summary>
        /// <param name="patid"></param>
        /// <param name="hzxm"></param>
        /// <param name="ksrq"></param>
        /// <param name="jsrq"></param>
        /// <returns></returns>
        public IEnumerable<CMZXX007Response> QueryChargeList(CMZXX007 model)
        {
            List<SqlParameter> param = new List<SqlParameter>();
            param.Add(new SqlParameter("@Patid",model.patid));
            param.Add(new SqlParameter("@Hzxm",model.hzxm));
            param.Add(new SqlParameter("@Ksrq",model.ksrq));
            param.Add(new SqlParameter("@Jsrq",model.jsrq));
            param.Add(new SqlParameter("@Czyh", "hf001"));
            var result = Query<CMZXX007Response>("exec usp_web_webtrans_CMZXX007 @patid=@Patid,@hzxm=@Hzxm,@ksrq=@Ksrq,@jsrq=@Jsrq,@czyh=@Czyh", param);
            return result;
        }
    }
}
